#ifndef D3D_INPUT_H
#define D3D_INPUT_H

#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>

class D3DInput{
public:
	D3DInput(DWORD keyboardCoopFlags, DWORD mouseCoopFlags);
	~D3DInput();

	void poll();
	bool keyDown(unsigned char key);
	bool mouseDown(int button);
	float mouseDX();
	float mouseDY();
	float mouseDZ();

private:
	IDirectInput8*			mInput;
	IDirectInputDevice8*	mKeyboard;
	unsigned char 			mKeyboardState[256];
	IDirectInputDevice8*	mMouse;
	DIMOUSESTATE2			mMouseState;
};

extern D3DInput* gInput;
#endif